import request from '@/utils/request'

// 查询每周食谱列表
export function listWeeklyMenu(query) {
  return request({
    url: '/catering/weeklyMenu/list',
    method: 'get',
    params: query
  })
}

// 查询每周食谱详细
export function getWeeklyMenu(id) {
  return request({
    url: '/catering/weeklyMenu/' + id,
    method: 'get'
  })
}

// 新增每周食谱
export function addWeeklyMenu(data) {
  return request({
    url: '/catering/weeklyMenu/save',
    method: 'post',
    data: data
  })
}

// 修改每周食谱
export function updateWeeklyMenu(data) {
  return request({
    url: '/catering/weeklyMenu/save',
    method: 'put',
    data: data
  })
}

// 删除每周食谱
export function delWeeklyMenu(id) {
  return request({
    url: '/catering/weeklyMenu/remove/' + id,
    method: 'delete'
  })
}

// 导出每周食谱
export function exportWeeklyMenu(query) {
  return request({
    url: '/catering/weeklyMenu/export',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

// 查询所有每周食谱
export function getAllWeeklyMenus() {
  return request({
    url: '/catering/weeklyMenu/all',
    method: 'get'
  })
} 